package com.xz.spi.services.impl;

import com.xz.simplerpc.api.ScoreService;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Created by Fingal on 2017-12-4.
 */
public class ScoreServiceImpl implements ScoreService {

    private static final Map<String, Integer> scores = new ConcurrentHashMap<String, Integer>();

    public ScoreServiceImpl() {
        scores.put("小泽", 100);
        scores.put("张三", 80);
        scores.put("李四", 75);
    }

    @Override
    public Integer query(String name) {
        System.out.println( name + " want to query score...");
        return scores.get(name);
    }
}
